home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / src / source.zoo / icnvrt.c < prev    next >
C/C++ Source or Header  |  1989-05-15  |  787b  |  50 lines

  1. /* Coordinate transformations for plotting package */
  2. /* Convertion routines yielding an integer result  */
  3.  
  4. #include "plplot.h"
  5. #include "declare.h"
  6.  
  7. /* dcpc. converts device coordinates to physical coordinates */
  8.  
  9. int dcpcx(x)
  10. float x;
  11. {
  12.       return(round(dpxoff + dpxscl * x));
  13. }
  14.  
  15. int dcpcy(y)
  16. float y;
  17. {
  18.       return(round(dpyoff + dpyscl * y));
  19. }
  20.  
  21. /* mmpc. converts millimetres from bottom left-hand corner to physical */
  22. /* coordinates */
  23.  
  24. int mmpcx(x)
  25. float x;
  26. {
  27.       return(round(mpxoff + mpxscl * x));
  28. }
  29.  
  30. int mmpcy(y)
  31. float y;
  32. {
  33.       return(round(mpyoff + mpyscl * y));
  34. }
  35.  
  36. /* wcpc. converts world coordinates to physical coordinates */
  37.  
  38. int wcpcx(x)
  39. float x;
  40. {
  41.       return(round(wpxoff + wpxscl * x));
  42. }
  43.  
  44. int wcpcy(y)
  45. float y;
  46. {
  47.       return(round(wpyoff + wpyscl * y));
  48. }
  49.  
  50.